Database Copy Utility

The Database Copy utility (DBSCopy.exe) is a command-line utility that copies or moves queues from one database service to another, or deletes queues from a database service. This program assumes the source and target database structures are identical. When copying or moving a queue, if the queue key being moved or copied exists in the target database, an error will be returned and the process will not be completed.

This utility requires that all services involved in the operation be running.

Syntax

DBSCopy config_file[.cfg]

Parameters

DBSCOPY requires a configuration file that contains the run parameters. This is a text file. The file name is configurable. The extension (.cfg) is optional. The contents of the configuration file must be in UPPERCASE but not in any particular order. Keywords and parameters must be separated by a single space.

Parameter Definition

config_file[.cfg]

Keywords:

SOURCE_SERVICE

Specifies the Site.Service of the source file.

TARGET_SERVICE

Specifies the Site.Service of the target file.

START_KEY

Specifies the starting key. Default is 0000000000.

END_KEY

Specifies the ending key. Default is START_KEY.

MOVE

Keyword to move source records (that is, delete source records after copying). Set the keyword to YES to activate it.

DELETE_ONLY

Keyword to delete source records only. Set the keyword to YES to activate it. You do not need to specify a target service for this operation.

INACTIVES_ONLY

Keyword to copy, move, or delete only those queues of records that have the client header Inactive flag set. Set the keyword to YES to activate it.

Example

DBSCopy MyConfigFile.cfg

 

MyConfigFile.cfg:

SOURCE_SERVICE MYSITE.MSS

TARGET_SERVICE MYSITE.MSSNEW

START_KEY 0000000001

END_KEY 0000000025

MOVE YES

DELETE_ONLY NO

INACTIVES_ONLY NO